#include "DataSourceInstance.h"
#include "./common/YXConfig.h"
#include "./common/YXMySQL.h"

DataSource *dataSource;

__attribute__((constructor(YX_CONFIG_INIT_PRIORITY + 1))) void dataSourceInit() {
    dataSource = createDataSource(yxConfig.getStrProperty("mysql.host"), yxConfig.getIntProperty("mysql.port"), yxConfig.getStrProperty("mysql.user"), yxConfig.getStrProperty("mysql.password"), yxConfig.getStrProperty("mysql.database"));
}
